DB Maintenance: Table Details

The iMIS Table Details page allows you to do analysis and apply fixes and changes at table level rather than globally. All iMIS tables are listed alphabetically. When you select a table, a mini-analysis runs on it and reports in the Output area. 

Features of Table Details

■    Number of rows: The top right shows a row count for the selected table.

■    Output: For the selected table, a brief table analysis runs, testing whether the table is missing, is missing columns, or has columns of an incorrect type. The analysis runs when you click on a table name in the list. This read-only area shows system information and quick analysis results.

■    OK: returns you to the main DB Maintenance page.

Table-level commands

■    Reset Table: Performs a non-destructive reset of the table, replacing any missing triggers, indexes, permissions, or foreign keys.

■    Rebuild Table: Performs a full rebuild of the table (rename the table, re-create the table schema, copy the data back over, re-establish all indexes, triggers, and permissions). It recreates the table from scratch, preserving data. If the table contains large amounts of data, allow ample time for this process to run.

Caution! You lose any user-added columns when you rebuild a table.

■    Create Table: Recreates the table schema, indexes, triggers, and permissions. Enabled only if the table is missing. 

■    Truncate Table: Deletes all the data in the table, following a prompt for confirmation. Truncating a table with zero rows has no effect, but it runs the command just like any other table, and is useful for testing.

■    Reset Permissions: Ensures the table is granted the proper permissions to the iMIS Group.

Indexes... lets you work with indexes associated with the selected table. Enabled only if there are indexes.

■    Create Indexes: Creates any indexes that are missing, ensuring that the table has all of the iMIS indexes it needs.

■    Drop Indexes: Drops the indexes associated with the table, except for indexes that are constraints; preserves user-added indexes. This does not affect primary or alternate keys, which may be the target of a foreign key constraint.

■    Rebuild Indexes: Rebuilds all indexes associated with the table.

Triggers... lets you work with triggers associated with the selected table. Enabled only if triggers exist.

■    Enable Triggers: Re-enables disabled triggers, which is useful after importing records. Enabled only if there are or should be system triggers on the table (ignores user triggers).

■    Disable Triggers: Preserves triggers but disables them, which is useful when importing records. Enabled only if there are or should be system triggers on the table (disables user triggers as well).

■    Create Triggers: Creates any triggers that are missing.

■    Drop Triggers: Drops the triggers associated with the selected table.

Foreign Keys... lets you work with foreign keys on the selected table as well as other tables that reference it. Enabled only if such foreign keys exist.

■    Enable Table FKs:  Re-enables any disabled foreign keys on the table and checks them all. Enabled only if there are or should be foreign keys on the table.

■    Disable Table FKs: Disables any foreign keys, which is useful when importing records. Enabled only if there are or should be foreign keys on the table.

■    Create Table FKs: Creates the foreign keys on the selected table. Enabled only if there should be foreign keys on the table.

■    Drop Table FKs: Drops the foreign keys on the selected table. Enabled only if there are foreign keys on the table.

■    Create Referencing FKs: Creates the foreign keys on all tables that reference the selected table.

■    Drop Referencing FKs: Drops the foreign keys on all tables that reference the selected table.

■    Create ALL FKs: Creates the foreign keys on the selected table and on all tables that reference it.

■    Drop ALL FKs: Drops the foreign keys on the selected table and on all tables that reference it.